package org.example.myleet.p740;

import org.example.myleet.Utils.Assert;

public class Main {
    public static void main(String[] args) {
        Solution solution = new Solution();
        Assert.isTrue(3 == solution.deleteAndEarn(new int[]{3}));
        Assert.isTrue(4 == solution.deleteAndEarn(new int[]{4,3}));
        Assert.isTrue(4 == solution.deleteAndEarn(new int[]{3,1}));
        Assert.isTrue(6 == solution.deleteAndEarn(new int[]{3,4,2}));
        Assert.isTrue(9 == solution.deleteAndEarn(new int[]{2,2,3,3,3,4}));
        Assert.isTrue(18 == solution.deleteAndEarn(new int[]{1,1,1,2,4,5,5,5,6}));
        Assert.isTrue(33 == solution.deleteAndEarn(new int[]{1,1,1,2,4,5,5,5,6,6,6,7,8}));
    }
}
